package com.sky.mapper;/*
 * ClassName: DishFlavorMapper
 * Package : com.sky.mapper
 * Description:
 * @Author zKer
 * @Create 2024/4/13 21:46
 */

import com.sky.entity.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DishFlavorMapper {

    /**
     * @param flavors:
      * @return void
     * @description 批量插入口味数据
     */
    void insertBatch(List<DishFlavor> flavors);

    @Delete("delete from dish_flavor where dish_id = #{dishId}")
    void deleteById(Long dishId);

    void deleteByIds(List<Long> dishIds);

    @Select("select * from dish_flavor where dish_id = #{dishId}")
    List<DishFlavor> getByDishId(Long dishId);


}
